import request from '@/utils/request'

// 通过车牌号 获取 装卸单信息
export function getLoadingOrderByPlateNumber(plateNumber) {
    return request({
        url: '/mobile/operation/getLoadingOrderByPlateNumber?plateNumber='+plateNumber,
        method: 'get'
    })
}

// 1.01预约单确认 分配月台
export function appointmentDock(appointmentId,dockId) {
    return request({
        url: '/mobile/operation/confirm/appointmentDock?appointmentId='+appointmentId+'&dockId='+dockId,
        method: 'get'
    })
}

// 2 手动叫号
export function callQueue(queueRecordId) {
    return request({
        url: '/mobile/operation/callQueue?queueRecordId='+queueRecordId,
        method: 'get'
    })
}

// 3 手动进场
export function carIn(loadingOrderNo) {
    return request({
        url: '/mobile/operation/carIn?loadingOrderNo='+loadingOrderNo,
        method: 'get'
    })
}

// 4.第一次过磅
/**
 * 1.第一次过磅
 * @param loadingOrderNo  装卸单编号
 * @param weight    填写重量
 * @param type      1.装  2 卸
 * @returns {*}
 */
export function carWeightOne(loadingOrderNo,weight,type) {
    return request({
        url: '/mobile/operation/carWeightOne?loadingOrderNo='+loadingOrderNo+'&weight='+weight+'&type='+type,
        method: 'get'
    })

}

// 5.手动确认开始装卸
export function confirmUnLoadStart(loadingOrderNo) {
    return request({
        url: '/mobile/operation/confirmUnLoadStart?loadingOrderNo='+loadingOrderNo,
        method: 'get'
    })
}

// 6.手动确认结束装卸
export function confirmUnLoadEnd(loadingOrderNo) {
    return request({
        url: '/mobile/operation/confirmUnLoadEnd?loadingOrderNo='+loadingOrderNo,
        method: 'get'
    })
}

// 7.第二次过磅
export function carWeightTwo(loadingOrderNo,weight,type) {
    return request({
        url: '/mobile/operation/carWeightTwo?loadingOrderNo='+loadingOrderNo+'&weight='+weight+'&type='+type,
        method: 'get'
    })
}

// 8.手动出场
export function carOut(loadingOrderNo) {
    return request({
        url: '/mobile/operation/carOut?loadingOrderNo='+loadingOrderNo,
        method: 'get'
    })
}
